<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="__SELF__" data-auto="true" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">运费名称</label>
        <div class="layui-input-block">
            {if $info and isset($info.title)}
            <input name="title" value='{$info.title|default=""}'
                   required="required" title="请输入运费名称" placeholder="请输入运费名称" class="layui-input ">
            {else /}
            <input name="title" value='{$info.title|default=""}' required="required"
                   title="请输入运费名称" class="layui-input">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">配送范围</label>
        <div class="layui-input-block">
            {if $info and isset($info.distance)}
            <input type="text" name="distance" value='{$info.distance|default=""}'
                   required="required" title="配送范围格式错误" pattern="^[0-9]+(.[0-9]{2})?$" placeholder="请输入配送范围/公里" class="layui-input ">
            {else /}
            <input type="text" name="distance" value='{$info.distance|default=""}' required="required"
                   title="配送范围格式错误" pattern="^[0-9]+(.[0-9]{2})?$" class="layui-input">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">运费</label>
        <div class="layui-input-block">
            {if $info and isset($info.price)}
            <input type="text" name="price" value='{$info.price|default=""}'
                   required="required" title="运费格式输入错误" placeholder="请输入运费" pattern="^[0-9]+(.[0-9]{2})?$" class="layui-input ">
            {else /}
            <input type="text" name="price" value='{$info.price|default=""}' pattern="^[0-9]+(.[0-9]{2})?$" required="required"
                   title="运费格式输入错误" class="layui-input">
            {/if}
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
        {if isset($info['id'])}<input type='hidden' value='{$info.id}' name='id'/>{/if}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
    <script>window.form.render();</script>
</form>
